package ehcache;

import java.io.ObjectInputStream.GetField;
import java.util.List;

import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Element;

public class MaxTest {
	
	public static void main(String[] args) {
		CacheManager manager = CacheManager.getInstance();
		Cache cache = manager.getCache("online-users");
		for(int i=0;i<200;i++){
			Element element = new Element("username"+i, "zhaohui"+i);
			cache.put(element);
		}
		cache.flush();
		System.out.println(cache.getSize());
		
	}

}
